import {Button, Collapse, Input} from 'antd';
import React, {useState} from 'react';
const { Panel } = Collapse;
const { TextArea } = Input;

function Result(props) {
    const [jsons,setJsons]=useState('')
    function callback(key) {
        console.log(key);
    }
    return (
        <Collapse defaultActiveKey={['1']} onChange={callback}>
            <Panel header="转化的JSON" key="1">
                <div>{props.json}</div>
            </Panel>
            <Panel header="导入JSON" key="2">
                <TextArea
                    row={6}
                    onChange={(e)=>{
                        setJsons(e.target.value)
                    }}
                />
                <Button onClick={()=>{

                }}>
                    导入
                </Button>
            </Panel>

        </Collapse>    );
}

export default Result;